home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-03-22 | 912 b | 34 lines |
- ' M. R. N. Arnold (c)opyright 1992.
- '
- ' How to call a DOS function from AMOS, Someink that the farking manual
- ' should tell ya but they couldnt be bothered, or maybe there incapable of
- ' writing a few lines of machine code!??!?!!!!!!!!!!
- '
- Reserve As Work 14,200 : Rem Reserve a bank to shove the command line in!
- Screen Open 0,640,200,2,Hires : Rem Boring but QUICK screen!
- Paper 0 : Pen 1 : Cls : Colour 1,$CCC : ER=0 : Rem My Fave Preferences!
- Curs On
- '
- For F=1 To 20 : Print : Next F
- Do
- Line Input "Command =>";X$
- '
- EXECUTE[X$]
- Print
- Loop
- '
- '
- ' This is the main EXECUTE procedure which is a short machine code routine
- ' which calls to dos your command, the machine code is stored in bank, er
- ' hangon.......Yep...Bank 15 and is a kewl 88 bytes long...Wow!
- '
- Procedure EXECUTE[X$]
- A=Start(14)
- For F=1 To Len(X$)
- Poke A,Asc(Mid$(X$,F,1))
- Inc A
- Next F
- Poke A,0
- Dreg(4)=Start(14)
- Call 15
- End Proc